<admintpl file="headerEx"/>
<link href="__PUBLIC__/js/artDialog/skins/default.css" rel="stylesheet" />
<title>{:L('ADMIN_MENU_ADD')}</title>
<!--responsive table-->
<link href="__PUBLIC__/TciocEx/css/table-responsive.css" rel="stylesheet"/>
<!--ios7-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/TciocEx/js/ios-switch/switchery.css" />

<!--icheck-->
<link href="__PUBLIC__/TciocEx/js/iCheck/skins/minimal/minimal.css" rel="stylesheet">
<link href="__PUBLIC__/TciocEx/js/iCheck/skins/minimal/red.css" rel="stylesheet">
<link href="__PUBLIC__/TciocEx/js/iCheck/skins/minimal/green.css" rel="stylesheet">
</head>
<body class="sticky-header">
<section>
	<!-- main content start-->
	<div class="full-content">
		<!-- body wrapper start -->
		<div class="wrapper">
			<div class="row">
				<div class="col-sm-12">
					<section class="panel">
						<header class="panel-heading custom-tab turquoise-tab">
							<ul class="nav nav-tabs">
								<li>
									<a href="{:U('menu/index')}">
										<i class="fa fa-list-ul"></i> {:L('ADMIN_MENU_INDEX')}
									</a>
								</li>
								<li  >
									<a href="{:U('menu/add')}">
										<i class="fa fa-plus-square"></i>  {:L('ADMIN_MENU_ADD')}
									</a>
								</li>
								<li class="active">
									<a href="{:U('menu/edit')}">
										<i class="fa fa-edit"></i> 编辑菜单
									</a>
								</li>
							</ul>
						</header>
						<div class="panel-body">
							<div class=" form">
								<form class="cmxform form-horizontal adminex-form js-ajax-form" id="commentForm" method="post" action="{:U('Menu/edit_post')}" novalidate="novalidate">
									<div class="form-group">
										<label  for="parentid" class="control-label col-lg-2" >上级: </label>
										<div >
											&nbsp;<select name="parentid" id="parentid" style="height:30px;" >

											<option value="0">作为一级菜单</option>
											{$select_categorys}
										</select>
										</div>
									</div>

									<div class="form-group">
										<label for="name" class="control-label col-lg-2">名称:(*)</label>
										<div class="col-lg-10">
											<input   class=" form-control" id="name" name="name" minlength="1" value="{$data.name}" type="text" required="" placeholder="请填写菜单名称！">
										</div>
									</div>
									<div class="form-group">
										<label for="app" class="control-label col-lg-2">应用:(*)</label>
										<div class="col-lg-10">
											<input   class=" form-control" id="app" name="app" minlength="1" value="{$data.app}" type="text" required="" placeholder="请填写密码！">
										</div>
									</div>
									<div class="form-group">
										<label for="model" class="control-label col-lg-2">控制器:(*)</label>
										<div class="col-lg-10">
											<input   class=" form-control" id="model" name="model" minlength="1" value="{$data.model}" type="text" required="" placeholder="请填写密码！">
										</div>
									</div>
									<div class="form-group">
										<label for="action" class="control-label col-lg-2">方法:(*)</label>
										<div class="col-lg-10">
											<input   class=" form-control" id="action" name="action" minlength="1" value="{$data.action}" type="text" required="" placeholder="请填写密码！">
										</div>
									</div>
									<div class="form-group">
										<label for="data" class="control-label col-lg-2">参数:</label>
										<div class="col-lg-10">
											<input   class=" form-control" id="data" name="data" value="{$data.data}" type="text" placeholder="请填写密码！">例:id=3&amp;p=3
										</div>
									</div>
									<div class="form-group">
										<label for="icon" class="control-label col-lg-2">图标:</label>
										<div class="col-lg-10">
											<input class=" form-control" id="icon"  type="text" name="icon" value="{$data.icon}" >
											<a href="http://www.thinkcmf.com/font/icons" target="_blank">选择图标</a> 不带前缀fa-，如fa-user => user
										</div>
									</div>
									<div class="form-group">
										<label  for="remark" class="control-label col-lg-2" >备注:</label>
										<div class="col-lg-10">
											<textarea class=" form-control" id="remark"    name="remark" rows="5" cols="57" style="width: 500px;">{$data.remark}</textarea>
										</div>
									</div>
									<div class="form-group">
										<label  for="status" class="control-label col-lg-2" >状态: </label>
										<div >
											&nbsp;<select name="status" id="status" style="height:30px;" >
											<option <eq  name="data.status" value="1">selected = "selected"</eq> value="1">显示</option>
											<option <eq  name="data.status" value="0">selected = "selected"</eq> value="0">隐藏</option>
										</select>
										</div>
									</div>
									<div class="form-group">
										<label for="type" class="control-label col-lg-2"  >类型:</label>
										<div >
											<select  name="type" id="type" style="height:30px;" >
												<option <eq  name="data.type" value="1">selected = "selected"</eq> value="1">权限认证+菜单</option>
												<option <eq  name="data.type" value="0">selected = "selected"</eq> value="0">只作为菜单</option>
											</select>
											注意：“权限认证+菜单”表示加入后台权限管理，纯碎是菜单项请不要选择此项。
										</div>
									</div>

									<div class="form-group">
										<div class="col-md-12 text-center clearfix">
											<input type="hidden" name="id" value="{$data.id}" />
											<button class="btn btn-primary js-ajax-submit" type="submit">{:L('SAVE')}</button>
											<a href="javascript:history.back(-1);" class="btn btn-default">{:L('BACK')}</a>
										</div>
									</div>
								</form>
							</div>

						</div>
					</section>

				</div>
			</div>
		</div>
		<!--footer section start-->
		<footer>
			<admintpl file="copyright"/>
		</footer>
		<!--footer section end-->
	</div>
	<!-- main content end-->
</section>
<script src="__PUBLIC__/TciocEx/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/js/wind.js"></script>
<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="__PUBLIC__/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-migrate-1.2.1.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/modernizr.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/js/ajaxForm.js"></script>

<script type="text/javascript" src="__PUBLIC__/TciocEx/js/jquery.validate.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-localization/messages_zh.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/scripts.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-init.js"></script>
<script>
	$(function() {
		$(".js-ajax-close-btn").on('click', function(e) {
			e.preventDefault();
			Wind.use("artDialog", function() {
				art.dialog({
					id : "question",
					icon : "question",
					fixed : true,
					lock : true,
					background : "#CCCCCC",
					opacity : 0,
					content : "您确定需要关闭当前页面嘛？",
					ok : function() {
						setCookie('refersh_time_admin_menu_index', 1);
						window.close();
						return true;
					}
				});
			});
		});
	});
</script>
</body>
</html>
